package com.pearadmin.system.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pearadmin.common.web.domain.request.PageDomain;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.pearadmin.system.mapper.ReportUsualScoreStandardMapper;
import com.pearadmin.system.domain.ReportUsualScoreStandard;
import com.pearadmin.system.service.IReportUsualScoreStandardService;

/**
 * 平时成绩评分标准Service业务层处理
 * 
 * @author jmys
 * @date 2021-04-12
 */
@Service
public class ReportUsualScoreStandardServiceImpl implements IReportUsualScoreStandardService 
{
    @Autowired
    private ReportUsualScoreStandardMapper reportUsualScoreStandardMapper;

    /**
     * 查询平时成绩评分标准
     * 
     * @param id 平时成绩评分标准ID
     * @return 平时成绩评分标准
     */
    @Override
    public ReportUsualScoreStandard selectReportUsualScoreStandardById(Long id)
    {
        return reportUsualScoreStandardMapper.selectReportUsualScoreStandardById(id);
    }

    /**
     * 查询平时成绩评分标准列表
     * 
     * @param reportUsualScoreStandard 平时成绩评分标准
     * @return 平时成绩评分标准
     */
    @Override
    public List<ReportUsualScoreStandard> selectReportUsualScoreStandardList(ReportUsualScoreStandard reportUsualScoreStandard)
    {
        return reportUsualScoreStandardMapper.selectReportUsualScoreStandardList(reportUsualScoreStandard);
    }

    /**
     * 查询平时成绩评分标准
     * @param reportUsualScoreStandard 平时成绩评分标准
     * @param pageDomain
     * @return 平时成绩评分标准 分页集合
     * */
    @Override
    public PageInfo<ReportUsualScoreStandard> selectReportUsualScoreStandardPage(ReportUsualScoreStandard reportUsualScoreStandard, PageDomain pageDomain)
    {
        PageHelper.startPage(pageDomain.getPage(),pageDomain.getLimit());
        List<ReportUsualScoreStandard> data = reportUsualScoreStandardMapper.selectReportUsualScoreStandardList(reportUsualScoreStandard);
        return new PageInfo<>(data);
    }

    /**
     * 新增平时成绩评分标准
     * 
     * @param reportUsualScoreStandard 平时成绩评分标准
     * @return 结果
     */

    @Override
    public int insertReportUsualScoreStandard(ReportUsualScoreStandard reportUsualScoreStandard)
    {
        return reportUsualScoreStandardMapper.insertReportUsualScoreStandard(reportUsualScoreStandard);
    }

    /**
     * 修改平时成绩评分标准
     * 
     * @param reportUsualScoreStandard 平时成绩评分标准
     * @return 结果
     */
    @Override
    public int updateReportUsualScoreStandard(ReportUsualScoreStandard reportUsualScoreStandard)
    {
        return reportUsualScoreStandardMapper.updateReportUsualScoreStandard(reportUsualScoreStandard);
    }

    /**
     * 删除平时成绩评分标准对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteReportUsualScoreStandardByIds(String[] ids)
    {
        return reportUsualScoreStandardMapper.deleteReportUsualScoreStandardByIds(ids);
    }

    /**
     * 删除平时成绩评分标准信息
     * 
     * @param id 平时成绩评分标准ID
     * @return 结果
     */
    @Override
    public int deleteReportUsualScoreStandardById(Long id)
    {
        return reportUsualScoreStandardMapper.deleteReportUsualScoreStandardById(id);
    }
}
